<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('资产图片')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <input type="hidden" th:value="${assetDetail.id}" id="id">
    <input type="hidden" th:value="${assetDetail.imgCount}" id="imgCount">
    <h3>资产信息</h3>
    <table id="bootstrap-table" class="table table-hover">
        <thead>
            <tr>
                <th>资产编码</th>
                <th>资产名称</th>
                <th>资产类别</th>
                <th>规格</th>
                <th>型号</th>
                <th>数量</th>
                <th>管理部门</th>
                <th>使用部门</th>
                <th>使用地点</th>
                <th>资产情况</th>
                <th>图片</th>
                <th>创建人</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td th:text="${assetDetail.assetCode}"></td>
                <td th:text="${assetDetail.assetName}"></td>
                <td th:text="${assetDetail.assetType}"></td>
                <td th:text="${assetDetail.specifications}"></td>
                <td th:text="${assetDetail.assetModel}"></td>
                <td th:text="${assetDetail.amount}"></td>
                <td th:text="${assetDetail.manageDeptName}"></td>
                <td th:text="${assetDetail.useDeptName}"></td>
                <td th:text="${assetDetail.address}"></td>
                <td th:text="${assetDetail.useStatus}"></td>
                <td th><a th:text="${assetDetail.imgCount}" href="javascript:void(0)" onclick="showImg()"></a></td>
                <td th:text="${assetDetail.createByName}"></td>
            </tr>
        </tbody>
    </table>
    <h3>集团信息</h3>
    <table id="bootstrap-table" class="table table-hover">
        <thead>
            <tr>
                <th>资产编码</th>
                <th>资产名称</th>
                <th>资产类别</th>
                <th>规格</th>
                <th>型号</th>
                <th>本币原值</th>
                <th>累积折扣</th>
                <th>本年折扣</th>
                <th>净值</th>
                <th>净额</th>
                <th>减值准备</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td th:text="${cliqueDetail.assetCode}"></td>
                <td th:text="${cliqueDetail.assetName}"></td>
                <td th:text="${cliqueDetail.assetType}"></td>
                <td th:text="${cliqueDetail.specifications}"></td>
                <td th:text="${cliqueDetail.assetModel}"></td>
                <td th:text="${cliqueDetail.originalValue}"></td>
                <td th:text="${cliqueDetail.accumulatedDiscount}"></td>
                <td th:text="${cliqueDetail.thisDiscount}"></td>
                <td th:text="${cliqueDetail.netWorth}"></td>
                <td th:text="${cliqueDetail.netAmount}"></td>
                <td th:text="${cliqueDetail.impairment}"></td>
            </tr>
        </tbody>
    </table>
</div>
<th:block th:include="include :: footer" />
<script>
    var prefix = ctx + "asset/assetDetail";
    function showImg() {
        var id=$("#id").val();
        var imgCount=$('#imgCount').val();
        if (parseInt(imgCount)>0){
            $.modal.open('资产图片',prefix+"/showImg/"+id);
        }else{
            $.modal.alertWarning("没有图片");
        }
    }
    function submitHandler() {
        $.modal.close(layer.index);
    }
</script>
</body>
</html>